<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>jsc-input-text</title>
    <script type="text/javascript" src="js/app.js"></script>
    <script type="module" src="../src/js/form.js"></script>
    <script type="module" src="../src/js/inputTextarea.js"></script>
</head>

<body>
    <jsc-form class="form">
        <div style="width: 200px;">
            <label>姓名</label>
            <jsc-input-textarea maxlength='256' title = '更新' closeByModal placeholder='dsadsa' jscbind='name'></jsc-input-textarea>
        </div>
        <div>
            <label>技能一名称</label>
            <jsc-input-textarea jscbind='skills.0.name' required></jsc-input-textarea>
        </div>
        <div>
            <label>技能二名称</label>
            <jsc-input-textarea jscbind='skills.1.name'></jsc-input-textarea>
        </div>
    </jsc-form>
</body>
<script defer="true" type="text/javascript">
    let person = { 'age': 13, 'isAdmin': true, name: 'Lora', skills: [{ name: 'shoot', power: 15 }, { name: 'jump', power: 64 }] };

    document.addEventListener('DOMContentLoaded', function (e) {
        let form = document.querySelector('jsc-form');
        form.bind = person;
    });
</script>

</html>